/*
 * Field validator vault
 *  
 * Copyright (C) 2011 Antti Leppä / Otavan Opisto
 * http://www.otavanopisto.fi
 * 
 * License: 
 * 
 * Licensed under GNU Lesser General Public License Version 3 or later (the "LGPL") 
 * http://www.gnu.org/licenses/lgpl.html
 */
fi.internetix.validation.FieldValidatorVault = 
  /** @lends fi.internetix.validation.FieldValidatorVault# */ 
  {
  /**
   * @class Static class for storing field validators
   * @constructs
   */  
  initialize: function () { }, 
  /**
   * Registers a validator
   * 
   * @param validator validator
   */
  registerValidator: function (validator) {
    this._validators.set(validator.getClassName(), validator);
  },
  /**
   * Returns all registred validators
   * 
   * @returns all registred validators
   */
  getValidators: function () {
    return this._validators.values();
  },
  _validators: new Hash()
};